
<?php include("include/textcenter.php"); ?>
<?php include("include/db.php"); ?>
<html>
<head>
<meta name="description" content="Admin<?php echo $tagdescription?>">
<meta name="keywords" content="<?php echo $tagkeywords?> Main">
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><?php echo $tagtitle?></title>

<script type="text/javascript" src="simpletreemenu.js">
/***********************************************
* Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="simpletree.css" />
<link rel="StyleSheet" href="include/css_classes.css" type="text/css">

<script language="javascript">
var state = true;
function doCheckAll(){
	if(state == true){			
		var listchk = document.chkForm.elements["chk[]"];
		//alert(listchk.length);
		for(i=0;i<listchk.length;i++){
			listchk[i].checked = true;
		}	
		state = false;
	}else{		
		var listchk = document.chkForm.elements["chk[]"];
		for(i=0;i<listchk.length;i++){
			listchk[i].checked = false;
		}	
		state = true;
	}	
}
</script>
</head>



<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" link="#0000FF" vlink="#800080" alink="#FF0000" bgcolor="#FFFFFF">
<!-- -------------------Header---------------------------- -->
<?php include("include/header.php"); ?>
<!-- -------------------End Header---------------------------- -->


<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="12%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="200" height="1"></td>
		<td width="1%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="16" height="1"></td>
		<td width="86%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="16" height="1"></td>
	</tr>	
	<tr>
		<!-- ///////////////////Begin Leftmenu/////////////////// -->
		<td width="12%" valign="top" bgcolor="#FFFFFF">
		<?php include("include/leftmenu.php"); ?>
		</td>
		<!-- ///////////////////End Leftmenu/////////////////// -->
		
		<td width="1%" valign="top" background="public/images/homepage/16.gif">&nbsp;</td>
		<td width="86%" valign="top">
	<br>
<!-- -------------------Begin Body---------------------------- -->
   <p class="title16B">&nbsp;Order shipping &nbsp; &nbsp;</p>
    <form id="chkForm" name="chkForm" method="post" action="order_print_list.php"> 
	<table style="font-size:10pt; 1px; width:90%;">
			<tr>
					<td align="center" colspan="9" height="50"><b style="font-size:12pt; color:Blue;">List Order</b></td>
				</tr>
				<tr bgcolor="#996699" style=" font-weight:bold;">						
                   <!-- <td style="padding:4px; width:100px;">Description</td>-->
                    <td>
                        <input type="checkbox" name="checkAll" id="checkAll" onclick="doCheckAll();"" />
                    </td>
                    <td style="padding:4px;">Invoice Date</td>
                    <td style="padding:4px;">Invoice No</td>
                    <td style="padding:4px;">Customer/Recipient</td>
                     <td style="padding:4px;">Ship Date</td>
                    <td style="padding:4px;">Ship No</td>
                    <td style="padding:4px;">Ship Method</td>
                    <td style="padding:4px;">PrintYN</td>
                    <td style="padding:4px;"></td>
					<!--<td style="padding:4px;" align="center" width="70px" colspan="2"></td>-->
				</tr>                

<?php 
$bgcolor ="#FDE8F2";

$rs_result = mysql_query("SELECT COUNT(order_id) FROM vnf_shop_order  where order_status = 2");
$row = mysql_fetch_row($rs_result); 
$total_records = $row[0]; 
$total_pages = ceil($total_records / 30); 

if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
$start_from = ($page-1) * 30; 
$rs_result = mysql_query("SELECT o.*, c.* from vnf_shop_order o
            left JOIN vnf_customer c ON o.user_id = c.CustomerNo  where order_status = 2 order by  order_id  LIMIT $start_from, 30");
while ($row = mysql_fetch_assoc($rs_result))
 {
     $oDate = strtotime($row['date_created']);
        $sDate = date("Y-m-d",$oDate);
//echo $Category, $Product;
?> 
    	<tr bgcolor="#FFFFFF" >
						<td>
                            <input type="checkbox" name="chk[]" value="<?php echo $row['order_id']?>" />
                        </td>
                        <td style="background-color: <?php echo "#".$bgcolor?>;">
							<a href="order_detail.php?id=<?php echo $row['order_id']?>"> <?php echo $sDate ?></a>
						</td>
						<td style="background-color: <?php echo "#".$bgcolor?>;">
						  <a href="order_detail.php?id=<?php echo $row['order_id'] ?>">	<?php echo $row['order_id'] ?></a>
						</td>
                        <td style="background-color: <?php echo "#".$bgcolor?>;">
						 <?php echo $row['BillToName'] ?><br />
                         <?php echo  $row['BillToAddress'] ?> <br />
                         <?php echo  $row['BillToCity']." ". $row['BillToState']." ". $row['BillToZipCode'] ?>
						</td>	
						<td style="background-color: <?php echo "#".$bgcolor?>;">
							<input type="text" value="<?php echo $row['ShipDate'] ?>" />
						</td>
						<td style="background-color: <?php echo "#".$bgcolor?>;">
							<input type="text" value="<?php echo $row['ShipNo'] ?>" />
						</td>
                        	<td style="background-color: <?php echo "#".$bgcolor?>;">
							<?php echo $row['ShipMethod'] ?>
						</td>
                        <td style="background-color: <?php echo "#".$bgcolor?>;">
							<?php echo $row['PrintYN'] ?>
						</td>
                       <td style="background-color: <?php echo "#".$bgcolor?>;">
							<a style="color:#0033FF" href="order_update.php?id=<?php echo $row['order_id'] ?>">
								Update
							</a>
						</td>
						<!--<td align="center">
							<a onClick="'."return confirm('Do you want to delete this category ?')".'"  style="color:#0033FF" href="index.php?com=order&func=delete&id='.$row['order_id'].'">
								Update
							</a>
						</td>-->
					</tr>
        	<?php 
	if ($bgcolor =="fde8f2")
 $bgcolor ="FFFFFF";
else  $bgcolor ="fde8f2";
}; 
?>

<div>
<?php

for ($i=1; $i<=$total_pages; $i++) { 
            echo "&nbsp;<a href='order_list.php?page=".$i."'>&nbsp;".$i."</a>"; 
}; 

?>	
</div>
</table>
<div>
    <input type="submit" name="formSubmit" value="Print" />
</div>
</form>
<br />
<!-- -------------------End Body---------------------------- -->

&nbsp;</td>
	</tr>

</table>
</div>
<!-- ----------------------------------------------- -->
<!-- \\\\\\\\\\\\\\\\\\\\\Begin Footer\\\\\\\\\\\\\\\\\\\\\ -->
<?php include("include/footer.php"); ?>
<!-- \\\\\\\\\\\\\\\\\\\\\End Footer\\\\\\\\\\\\\\\\\\\\\ -->
</body>

</html>